home *** CD-ROM | disk | FTP | other *** search
- ECHO OFF
- GOTO EDIT
- REM
- REM ***************
- REM * LIBRARY.BAT *
- REM ***************
- REM
- REM This batch file creates a new library or adds symbols to an existing library
- REM The format for using this batch file is LIBRARY LIBNAME SYMBOL1 SYMBOL2 ...
- REM where LIBNAME is the name of the library without the .LIB extension
- REM and SYMBOL1 SYMBOL2 ... are the names of up to 8 symbol files without
- REM the .SYM extension
- REM Example:
- REM LIBRARY MEDIA TV RADIO NEWSPAPR
- REM This command would create a library called MEDIA.LIB which would
- REM contain the symbols TV.SYM, RADIO.SYM, and NEWSPAPR.SYM. If the library
- REM already exists, this command would add the symbols to the library.
- REM
- :EDIT
- IF %1.LIB==.LIB GOTO ERROR1
- IF %2.SYM==.SYM GOTO ERROR1
- IF NOT EXIST %2.SYM GOTO ERROR2
- ECHO Starting library maintenance for %1.LIB
- IF EXIST %1.LIB GOTO HAVELIB
- ECHO We are creating a new library called %1.LIB
- ECHO We will start the library with the following symbol files:
- GOTO SYMBOL1
- :HAVELIB
- ECHO We will add the following symbol files to the library %1.LIB
- :SYMBOL1
- ECHO %2.SYM
- :SYMBOL2
- IF NOT EXIST %3.SYM GOTO ENDSYMS
- ECHO %3.SYM
- :SYMBOL3
- IF NOT EXIST %4.SYM GOTO ENDSYMS
- ECHO %4.SYM
- :SYMBOL4
- IF NOT EXIST %5.SYM GOTO ENDSYMS
- ECHO %5.SYM
- :SYMBOL5
- IF NOT EXIST %6.SYM GOTO ENDSYMS
- ECHO %6.SYM
- :SYMBOL6
- IF NOT EXIST %7.SYM GOTO ENDSYMS
- ECHO %7.SYM
- :SYMBOL7
- IF NOT EXIST %8.SYM GOTO ENDSYMS
- ECHO %8.SYM
- :SYMBOL8
- IF NOT EXIST %9.SYM GOTO ENDSYMS
- ECHO %9.SYM
- :ENDSYMS
- ECHO ON
- PAUSE Is this correct? Press any key to continue, Ctrl-Break to quit.
- ECHO OFF
- ECHO We are adding symbols to library %1.LIB
- IF EXIST %1.LIB GOTO OLDLIB
- COPY %2.SYM/B+%3.SYM+%4.SYM+%5.SYM+%6.SYM+%7.SYM+%8.SYM+%9.SYM %1.LIB/B
- GOTO END
- :OLDLIB
- COPY %1.LIB/B+%2.SYM+%3.SYM+%4.SYM+%5.SYM+%6.SYM+%7.SYM+%8.SYM+%9.SYM
- GOTO END
- :ERROR1
- ECHO We cannot process your LIBRARY command.
- ECHO You may be using LIBRARY with the incorrect format.
- ECHO The correct format for using LIBRARY is -
- ECHO
- ECHO LIBRARY library-name symbol-name-1 symbol-name-2 ...
- ECHO
- ECHO where
- ECHO library-name is the file name of the library without the
- ECHO .LIB extension
- ECHO and
- ECHO symbol-name-1 symbol-name-2 ...
- ECHO are 1 to 8 file names for symbol files without the .SYM extension.
- GOTO FINI
- :ERROR2
- ECHO We cannot process your LIBRARY command.
- ECHO The 1st symbol file %2.SYM cannot be found.
- ECHO Please check the directory for the correct file name.
- GOTO FINI
- :END
- ECHO Library maintenance completed for library %1.LIB
- :FINI